<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Baby Shop</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="styles/style.css" />
<script type="text/javascript" src="script/index.js" ></script>
</head>

<body>
	<div>
		<a href="#"><img src="images/logo.jpg" width="237" height="123" class="float" alt="setalpm" /></a>
		<!--<div class="inner_copy"><a href="http://www.greatdirectories.org/">web directories</a><a href="http://www.bestfreetemplates.info/">free CSS templates</a></div>-->
      	<div class="topnav">
			<form name="frmSearch" action="timkiem.php">
			<table border="0">
				<tr>
					<td><b>Tìm Kiếm: </b>&nbsp;</td>
					<td>
						<select name="cbbCategory">
							<option value="">--Tìm Theo--</option>
							<option value="Product">Tên Sản Phẩm</option>
							<option value="Shop">Tên Gian Hàng</option>
						</select>&nbsp;
					</td>
					<td><input type="text" name="txtKeyword"/>&nbsp;</td>
					<td><a href="javascript: timKiem()"><img src="images/search.gif" width="25" height="20" /></a></td>
				</tr>
			</table>
			</form>
		</div>
		<ul id="menu">
			<li><a href="index.html"><img src="images/but1.gif" alt="" width="110" height="32" /></a></li>
			<li><a href="dangnhap.php"><img src="images/but2.gif" alt="" width="110" height="32" /></a></li>
			<li><a href="#"><img src="images/but3.gif" alt="" width="110" height="32" /></a></li>
			<li><a href="#"><img src="images/but4.gif" alt="" width="110" height="32" /></a></li>
			<li><a href="#"><img src="images/but5.gif" alt="" width="110" height="32" /></a></li>
			<li><a href="#"><img src="images/but6.gif" alt="" width="110" height="32" /></a></li>
		</ul>
	</div>
	<div id="content">
		<div id="sidebar">
			<div id="navigation">
				<ul>
					<li><a href="index.html">trang chủ</a></li>
					<li><a href="#">sản phẩm mới</a></li>
					<li><a href="#">tất cả sản phẩm</a></li>
					<li><a href="#">đánh giá</a></li>
					<li><a href="#">F.A.Q.</a></li>
					<li><a href="#">liên hệ</a></li>
				</ul>
				<div id="cart">
					<strong>Giỏ hàng:</strong> <br /> 0 items
				</div>
			</div>
			<div>
				<img src="images/title1.gif" alt="" width="233" height="41" /><br />
				<ul class="categories">
					<li><a href="#">Categories 1</a></li>
					<li><a href="#">Categories 2</a></li>
					<li><a href="#">Categories 3</a></li>
					<li><a href="#">Categories 4</a></li>
					<li><a href="#">Categories 5</a></li>
                    <li><a href="#">Categories 6</a></li>
					<li><a href="#">Categories 7</a></li>
					<li><a href="#">Categories 8</a></li>
				</ul>
				<img src="images/title2.gif" alt="" width="233" height="41" /><br />
				<!--<div class="inner_copy"><a href="http://www.bestfreetemplates.org/">free templates</a><a href="http://www.bannermoz.com/">banner templates</a></div>-->
				<div class="review">
					<a href="#"><img src="hinhsp/item1.jpg" alt="" width="181" height="161" /></a><br />
					<a href="#">Product 07</a><br />
					<p>Thiên tầm ngoa, giày này thật là vãi lắm, mang vô + tốc độ chạy 50%, sinh lực 200 điểm, nội lực 200 điểm ĐỘ NGUY HIỂM 100000, liên hệ ngay nhé máy bạn trẻ , đừng bỏ lỡ cơ hội hiếm có</p>
					<img src="images/stars.jpg" alt="" width="118" height="20" class="stars" />
				</div>
			</div>
		</div>
		<div id="main">
		  <div id="inside">
			<div id="items">
			<?php
			if (!isset($_GET["cbbCategory"], $_GET["txtKeyword"])) {
				echo '<b>Không tìm thấy dữ liệu nào!</b>';
			} else {
				include 'dbconnect.inc';
				$keyword = $_GET["txtKeyword"];
				$category = $_GET["cbbCategory"];
				$keyword = strip_tags($keyword);
				$keyword = trim($keyword);
				if ($category == "Product") {
					$strSQL = "select * from san_pham where Ten_SanPham like '%".$keyword."%'";
				} else {
					$strSQL = "select * from san_pham where Gian_Hang like '%".$keyword."%'";
				}
				$result = mysql_query($strSQL);
				$count = mysql_num_rows($result);
				$i = 1;
				if ($count != 0) {
					while ($row = mysql_fetch_array($result)) {
						$i++;
						if (($i%3) == 0) {
							echo '<div class="item center">
								<a href="#"><img src="hinhsp/'.$row[7].'" width="213" height="192" /></a><br />
								<p><a href="#">'.$row[1].'</a></p><span class="price">$'.$row[5].'</span><br />
							</div>';
						} else {
							echo '<div class="item">
								<a href="#"><img src="hinhsp/'.$row[7].'" width="213" height="192" /></a><br />
								<p><a href="#">'.$row[1].'</a></p><span class="price">$'.$row[5].'</span><br />
							</div>';
						}
					}
				} else {
					echo '<b>Không tìm thấy dữ liệu nào!</b>';
				}
				mysql_close($connection);
			}
			?>
			</div>
		  </div>
		</div>
	</div>
	<div id="footer">
		<img src="images/cards.jpg" alt="" width="919" height="76" />
		<ul>
			<li><a href="#">Trang Chủ</a> |</li>
			<li><a href="#">Sản Phẩm Mới</a> |</li>
			<li><a href="#">Tất Cả Sản Phẩm</a> |</li>
			<li><a href="#">Đánh Giá</a> |</li>
			<li><a href="#">F.A.Q.</a> |</li>
			<li><a href="#">Liên Hệ</a></li>
		</ul>
		<p>Copyright ©. All rights reserved. Design by <a href="#" title="Free CSS Templates" target="_blank" class="bft">Lĩn Quang Tiếu</a></p>
		<!--<div class="inner_copy"><a href="http://www.beautifullife.info/">beautiful</a><a href="http://www.grungemagazine.com/">grunge</a></div>-->
	</div>
<map name="Map">
	<area shape="rect" coords="16,306,159,326" href="#">
</map>
</body>
</html>
